import request from '@/utils/request'
import {
  renderUrl
} from '../utils'

const headers = {
  'Content-Type': 'application/json'
}

export function add(data) {
  return request({
    url: '/admin/notice/add',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function edit(data) {
  return request({
    url: '/admin/notice/update',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function del(data) {
  return request({
    url: `/admin/notice/delete?noticeId=${data.id}`,
    method: 'POST',
    // data: JSON.stringify(data),
    headers
  })
}


export default {
  add,
  edit,
  del
}
